import time
from Po_kaoshi.Podemo.Base import Base
from selenium.webdriver.common.by import By
from Po_kaoshi.Podemo.Page import Page

class Page2(Page):

    zhanghao_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div/div[2]/div[1]/div/div/input')

    mima_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div/div[2]/div[2]/div/div/input')

    denglu_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div/div[3]/button/span')


    def zhanghao(self):
        self.send_keys(self.zhanghao_loc,'liyichi')

    def mima(self):
        self.send_keys(self.mima_loc,'123456')

    def denglu(self):
        self.click(self.denglu_loc)


    def yewu_luoji(self):
        self.open_url('http://localhost:8080/loging')
        time.sleep(2)
        self.zhanghao()
        time.sleep(2)
        self.mima()
        time.sleep(2)

        self.denglu()
        time.sleep(2)

